package com.ruiyian.common.core.domain.entity;

import com.ruiyian.common.annotation.Excel;
import com.ruiyian.common.core.domain.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import java.util.Date;
import java.util.List;

/**
 * @author chong
 * @email 673426164@qq.com
 * @create 2021/1/19
 * Desc: 设备bean
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ToString
public class Equipment extends BaseEntity {
    private static final long serialVersionUID = 1L;
    private Long id;
    @Excel(name = "设备名称")
    private String name;
    @Excel(name = "设备编码")
    private String code;
    @Excel(name = "设备类型")
    private String typeName;
    private Long  typeId;
    private Long deptId;
    @Excel(name = "隧道所")
    private String deptName;
    private Long tunnelId;
    @Excel(name = "隧道名称")
    private String tunnelName;
    private Date createTime;
    private Date updateTime;
    private String updateBy;
    private String createBy;
    @Excel(name = "省中心")
    private String province;
    @Excel(name = "区域中心")
    private String area;
    @Excel(name = "分中心")
    private String branch;
    @Excel(name = "区控编码")
    private String zoneControlCode;
    private Long roadId;
    @Excel(name = "所属道路")
    private String roadName;
    @Excel(name = "左右洞")
    private String holeLocation;
    @Excel(name = "方向")
    private String direction;
    private Long  direId;
    // 关联设备
    private String equipmentId;
    @Excel(name = "模型版本")
    private String version;
    @Excel(name = "行号")
    private String line;
    @Excel(name = "桩号偏移量")
    private String offset;
    @Excel(name = "起始桩号")
    private String spilenum;
    @Excel(name = "结束桩号")
    private String epilenum;
    private Long moduleId;
    @Excel(name = "模块名称")
    private String moduleName;
    private String typeIds;
    private String statusIds;
    // 1,正常,2故障,3离线
    private Integer status;
    private String longitude;
    private String latitude;
    // 是否虚拟设备
    private Integer ifVirtual = 0;
    /**
     * 洞方向id
     */
    private Long holeId;
    /**
     * 属性值
     */
    private Long propertyId;
    private String propertyCode;
    private String statusValue;
    /**
     * 点位
     */
    private List<Point> pointList;

    private String channelId;
    private String deviceId;

    // 设备类型编码
    private String eqType;

    public Equipment(Long tunnelId) {
        this.tunnelId = tunnelId;
    }

    public Equipment(Long tunnelId, Long direId, Long modelueId) {
        this.tunnelId = tunnelId;
        this.direId = direId;
        this.moduleId = modelueId;
    }

    private String ids;
}
